import React from 'react';
import { Table, Divider } from 'antd';


class CheackBoxPagination extends React.Component {
  constructor(props) {
    super(props)
  }
  render() {
    // let selectionType = useState('checkbox');
    // let rowSelection = {
    //   onChange: (selectedRowKeys, selectedRows) => {

    //     console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);

    //     this.props.delete(selectedRowKeys)
    //   },
    // getCheckboxProps: (record) => ({
    //   disabled: record.name === 'Disabled User',
    //   // Column configuration not to be checked
    //   name: record.name,
    // }),
    // };
    return (
      <div>
        {/* //分割线 */}
        <Divider />

        <Table
          rowSelection={{
            onChange: (selectedRowKeys, selectedRows) => {
              this.props.delete(selectedRows)
              console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
            }
          }}

          pagination={this.props.pagination}
          columns={this.props.columns}
          dataSource={this.props.dataSource}
          style={{'whiteSpace': 'pre'}}
        />
      </div>
    )
  }
}




export default CheackBoxPagination